package net.entelijan.cobean.tree;

import javax.swing.event.TreeModelEvent;
import javax.swing.event.TreeModelListener;
import javax.swing.tree.TreeModel;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * Represents the opening state of the tree.
 * TODO Implement the opening state of a JTree
 */
public class TreeState implements TreeModelListener {

	private Log log = LogFactory.getLog(TreeState.class);

	public TreeState() {
		super();
	}

	@Override
	public void treeNodesChanged(TreeModelEvent e) {
		log.info("[treeNodesChanged] e='" + e + "'");
	}

	@Override
	public void treeNodesInserted(TreeModelEvent e) {
		log.info("[treeNodesChanged] e='" + e + "'");
	}

	@Override
	public void treeNodesRemoved(TreeModelEvent e) {
		log.info("[treeNodesChanged] e='" + e + "'");
	}

	@Override
	public void treeStructureChanged(TreeModelEvent e) {
		log.info("[treeNodesChanged] e='" + e + "'");
	}

	public void restore(TreeModel treeModel) {
		log.info("[restore] e='" + treeModel + "'");
	}

}
